Derivative of cos(e^x) by chain rule